<div class="infoBlock infoBlockM">
<div class="infoBlockHeading">
<span class="t">{$CONTENT.item.subject}</span>
<span class="ps">
<a href="{$CONTEXT.URL}">Home</a> > 
{if $CONTENT.category_show == 1}
<a href="{$CONTEXT.URL}{$CONTENT.category.categories_link}">{$CONTENT.category.categories_name}</a> > 
{/if}
<a href="{$CONTEXT.URL}{$CONTENT.item.link}{$CONTEXT.URL_SUFFIX}">{$CONTENT.item.subject}</a>
</span>
</div>
<div class="infoBlockContent">

{if $CONTENT.item.style}
<style type="text/css">
{$CONTENT.item.style|text}
</style>
{/if}

<div class="infoBlockItem">
<div class="ab_txt">
{$CONTENT.item.introtext|nl2br}
</div>

<div class="ab_detail">
<div id="content_edit_preview" style="display: none;">{$CONTENT.item.fulltext|text}</div>
<input type="hidden" id="content_edit_id" value="{$CONTENT.item.id}">
<textarea id="content_edit_value" style="width: 100%; height: 300px;">{$CONTENT.item.fulltext|text}</textarea>
<p>&nbsp;</p>
<p>
<a id="content_edit_btn_save" href="javascript:void(0);" onclick="content_edit_save();return false;" class="btn">Save</a>
<a id="content_edit_btn_edit" href="javascript:void(0);" onclick="content_edit_edit();return false;" class="btn" style="display: none;">Edit</a>
<a id="content_edit_btn_cancel" href="javascript:void(0);" onclick="content_edit_cancel();return false;" class="btn" style="display: none;">Cancel</a>
</p>
</div>
</div>

</div>
</div>

{literal}
<script type="text/javascript">
function content_edit_save(){
	xc('ws_content_edit',[$E('content_edit_id').value,$E('content_edit_value').value]);
}
function content_edit_edit(){
	dshow("content_edit_btn_save");
	dhide("content_edit_btn_edit");
	dshow("content_edit_value");
	dhide("content_edit_preview");
}
function content_edit_savecb(r){
	dshow("content_edit_btn_edit");
	dhide("content_edit_btn_save");
	dshow("content_edit_preview");
	dhide("content_edit_value");
	$E("content_edit_preview").innerHTML = $E("content_edit_value").value.replace(/\n/g, "<br>");
}
</script>
{/literal}
